<div class="box-tools" style="top:10px;">
  <form class="form-inline" id="project—form" action="{:url('Member/account')}" method="GET" pjax-search="">
    <div class="form-group">
      <label for="status">状态</label>
      <select class="form-control" id="status" name="status" style="border-radius:3px;">
        <option value="-1">全部</option>
        <option value="1" {if condition="input('get.is_check') eq '1'" }selected="selected" {
        /if} >成功</option>
        <option value="0" {if condition="input('get.is_check') eq '0'" }selected="selected" {
        /if} >失败</option>
      </select>
    </div>
    <div class="form-group">
      <label for="type">类型</label>
      <select class="form-control" name="type" id="type" style="border-radius:3px;">
        <option value="0">全部</option>
        <option value="1" {if condition="input('get.is_check') eq '1'" }selected="selected" {
        /if} >消费</option>
        <option value="2" {if condition="input('get.is_check') eq '2'" }selected="selected" {
        /if} >充值</option>
        <option value="3" {if condition="input('get.is_check') eq '3'" }selected="selected" {
        /if} >退还</option>
        <option value="4" {if condition="input('get.is_check') eq '4'" }selected="selected" {
        /if} >收益</option>
        <option value="5" {if condition="input('get.is_check') eq '5'" }selected="selected" {
        /if} >提现</option>
      </select>
    </div>
    <div class="form-group">
      <label for="start_date">开始时间</label>
      <input class="form-control timepicker" autocomplete="off" id="start_date" name="start_date"
             value="{:input('get.start_date')}" placeholder="{$Think.lang.start_date}">
    </div>
    <div class="form-group">
      <label for="end_date">结束时间</label>
      <input class="form-control timepicker" autocomplete="off" id="end_date" name="end_date"
             value="{:input('get.end_date')}" placeholder="{$Think.lang.end_date}">
    </div>
    <div class="form-group">
      <label for="search">关键字</label>
      <input type="hidden" name="id" value="{$id}"/>
      <input type="text" name="search" id="search" class="form-control" value="{:input('get.search')}"
             placeholder="{$Think.lang.search}"/>
    </div>
    <div class="form-group">
      <button type="submit" class="btn btn-primary sreachs">搜索</button>
      <button type="button" id="dwonload" class="btn btn-primary sreachs">下载</button>
      <button type="button" class="btn btn-primary" onclick="resetForm()">重置</button>
    </div>
  </form>
</div>
<script>
    $(function () {
        $('#dwonload').click(function () {
            var url = "{:url('Member/account',['id'=>$id])}";
            var status = $("select[name='status']").val();
            var type = $("select[name='type']").val();
            var start_date = $("input[name='start_date']").val();
            var end_date = $("input[name='end_date']").val();
            var search = $("input[name='search']").val();
            location.href = url + "?status=" + status + "&type=" + type + "&start_date=" + start_date + "&end_date=" + end_date + "&search=" + search + "&down=1";
        })
    })

    function resetForm() {
        $('select[name="type"]').val('0')
        $('select[name="status"]').val('-1')
        $('input[name="start_date"]').val('')
        $('input[name="end_date"]').val('')
        $('input[name="search"]').val('')
        $('#project—form').submit()
    }
</script>